from fastapi import FastAPI
from core.config import settings
from fastapi.staticfiles import StaticFiles
from db.session import engine
from db.base import Base
from apis.base import api_router


app = FastAPI(title=settings.PROJECT_NAME, version=settings.PROJECT_VERSION)
# app static file
app.mount("/static", StaticFiles(directory="static"), name="static")  # pip install aiofiles
# app uri
app.include_router(api_router)
# db ORM
# print(settings.show())
Base.metadata.create_all(bind=engine)


if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app="main:app", host="127.0.0.1", reload=True, debug=True)
